using Newtonsoft.Json;

namespace Wechat.Crawler.Toptic;

// 定义DTO类
public class ResponseDto
{
    [JsonProperty("base_resp")]
    public BaseResponse BaseResp { get; set; }

    [JsonProperty("getalbum_resp")]
    public GetAlbumResponse GetAlbumResp { get; set; }
}

public class BaseResponse
{
    [JsonProperty("exportkey_token")]
    public string? ExportKeyToken { get; set; }

    [JsonProperty("ret")]
    public int Ret { get; set; }

    public override string ToString()
    {
        return $"ExportKeyToken={ExportKeyToken},Ret={this.Ret}";
    }
}

public class GetAlbumResponse
{
    [JsonProperty("base_info")]
    public BaseInfo? BaseInfo { get; set; }

    [JsonProperty("article_list")]
    public List<ArticleDto>? ArticleList { get; set; }
}

public class BaseInfo
{
    [JsonProperty("is_first_screen")]
    public string? IsFirstScreen { get; set; }
}

public class ArticleDto
{
    [JsonProperty("cover_img_1_1")]
    public string? CoverImg { get; set; }

    [JsonProperty("create_time")]
    public string? CreateTime { get; set; }

    [JsonProperty("is_pay_subscribe")]
    public string? IsPaySubscribe { get; set; }

    [JsonProperty("is_read")]
    public string? IsRead { get; set; }

    [JsonProperty("item_show_type")]
    public string? ItemShowType { get; set; }

    [JsonProperty("itemidx")]
    public string? Itemidx { get; set; }

    [JsonProperty("key")]
    public string? Key { get; set; }

    [JsonProperty("msgid")]
    public string? Msgid { get; set; }

    [JsonProperty("pos_num")]
    public string? PosNum { get; set; }

    [JsonProperty("title")]
    public string? Title { get; set; }

    [JsonProperty("tts_is_ban")]
    public string? TtsIsBan { get; set; }

    [JsonProperty("url")]
    public required string Url { get; set; }

    [JsonProperty("user_read_status")]
    public string? UserReadStatus { get; set; }
}
